Skip to content

path-uri: add lexical containment - #29614

Merged
jif-oai merged 2 commits into
mainfrom
jif/path-uri-lexical-containment
Jun 23, 2026
Merged

path-uri: add lexical containment#29614
jif-oai merged 2 commits into
mainfrom
jif/path-uri-lexical-containment

Conversation

@jif-oai

@jif-oai jif-oai commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Why

Executor-owned paths must remain portable while the orchestrator validates them. Converting a Windows or remote path into the orchestrator host's native Path just to check containment applies the wrong filesystem rules.

This PR adds the lexical containment primitive needed by the URI-native plugin stack.

What changed

  • Add PathUri::starts_with for lexical equality and containment.
  • Compare URI authorities and complete path segments, so plugin-other is not treated as a child of plugin.
  • Fail closed for encoded native path separators.
  • Treat opaque fallback URIs as containing only themselves.
  • Cover POSIX, Windows drive, UNC, authority, segment-boundary, encoded-separator, and opaque URI cases.
file:///C:/plugins/foo/assets/icon.svg
  is below file:///C:/plugins/foo

file:///C:/plugins/foo2/icon.svg
  is not below file:///C:/plugins/foo

Stack

  1. This PR — add lexical PathUri containment.
  2. Decouple plugin manifest path resolution #29620 — make manifest path resolution URI-native through one shared parser.
  3. Make selected plugin roots URI-native #28918 — keep selected plugin roots and resources URI-native.
  4. Load executor skills without host path conversion #29626 — load executor skills without host path conversion.
  5. Keep executor plugin MCP paths URI-native #29628 — resolve executor MCP working directories without host path conversion.

@jif-oai
jif-oai merged commit 4147824 into main Jun 23, 2026
31 checks passed
@jif-oai
jif-oai deleted the jif/path-uri-lexical-containment branch June 23, 2026 13:59
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant